3.297 \(\int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx\)

Optimal. Leaf size=93 \[ -\frac{i a^2 \sqrt{a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))}-\frac{i a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} d} \]

[Out]

((-I/2)*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(Sqrt[2]*d) - ((I/2)*a^2*Sqrt[a + I*a*T
an[c + d*x]])/(d*(a - I*a*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0834103, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {3487, 51, 63, 206} \[ -\frac{i a^2 \sqrt{a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))}-\frac{i a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

((-I/2)*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(Sqrt[2]*d) - ((I/2)*a^2*Sqrt[a + I*a*T
an[c + d*x]])/(d*(a - I*a*Tan[c + d*x]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 51

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n + 1
))/((b*c - a*d)*(m + 1)), x] - Dist[(d*(m + n + 2))/((b*c - a*d)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^n,
x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] &&  !(LtQ[n, -1] && (EqQ[a, 0] || (NeQ[
c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x))^{3/2} \, dx &=-\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x)^2 \sqrt{a+x}} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{i a^2 \sqrt{a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))}-\frac{\left (i a^2\right ) \operatorname{Subst}\left (\int \frac{1}{(a-x) \sqrt{a+x}} \, dx,x,i a \tan (c+d x)\right )}{4 d}\\ &=-\frac{i a^2 \sqrt{a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))}-\frac{\left (i a^2\right ) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{2 d}\\ &=-\frac{i a^{3/2} \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} d}-\frac{i a^2 \sqrt{a+i a \tan (c+d x)}}{2 d (a-i a \tan (c+d x))}\\ \end{align*}

Mathematica [A]  time = 0.580332, size = 97, normalized size = 1.04 \[ -\frac{i a e^{-i (c+d x)} \sqrt{1+e^{2 i (c+d x)}} \left (e^{i (c+d x)} \sqrt{1+e^{2 i (c+d x)}}+\sinh ^{-1}\left (e^{i (c+d x)}\right )\right ) \sqrt{a+i a \tan (c+d x)}}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^2*(a + I*a*Tan[c + d*x])^(3/2),x]

[Out]

((-I/4)*a*Sqrt[1 + E^((2*I)*(c + d*x))]*(E^(I*(c + d*x))*Sqrt[1 + E^((2*I)*(c + d*x))] + ArcSinh[E^(I*(c + d*x
))])*Sqrt[a + I*a*Tan[c + d*x]])/(d*E^(I*(c + d*x)))

________________________________________________________________________________________

Maple [B]  time = 0.332, size = 396, normalized size = 4.3 \begin{align*}{\frac{a}{8\,d \left ( i\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) -1 \right ) \cos \left ( dx+c \right ) } \left ( i\sqrt{2}\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) \left ( -2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}} \right ) ^{{\frac{3}{2}}}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( dx+c \right ) }{2\,\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) +i\sqrt{2} \left ( -2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}} \right ) ^{{\frac{3}{2}}}{\it Artanh} \left ({\frac{\sqrt{2}\sin \left ( dx+c \right ) }{2\,\cos \left ( dx+c \right ) }\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) \sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) \left ( -2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}} \right ) ^{{\frac{3}{2}}}\arctan \left ({\frac{\sqrt{2}}{2}\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) \sqrt{2}+\sqrt{2}\arctan \left ({\frac{\sqrt{2}}{2}\sqrt{-2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}}}} \right ) \left ( -2\,{\frac{\cos \left ( dx+c \right ) }{\cos \left ( dx+c \right ) +1}} \right ) ^{{\frac{3}{2}}}\sin \left ( dx+c \right ) -8\,i \left ( \cos \left ( dx+c \right ) \right ) ^{4}+4\,i \left ( \cos \left ( dx+c \right ) \right ) ^{3}+8\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}\sin \left ( dx+c \right ) +4\,i \left ( \cos \left ( dx+c \right ) \right ) ^{2}-4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}\sin \left ( dx+c \right ) \right ) \sqrt{{\frac{a \left ( i\sin \left ( dx+c \right ) +\cos \left ( dx+c \right ) \right ) }{\cos \left ( dx+c \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x)

[Out]

1/8/d*a*(I*2^(1/2)*sin(d*x+c)*cos(d*x+c)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctanh(1/2*2^(1/2)*(-2*cos(d*x+
c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))+I*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*arctanh(1/2*2^(
1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*sin(d*x+c)/cos(d*x+c))*sin(d*x+c)+cos(d*x+c)*sin(d*x+c)*(-2*cos(d*x+
c)/(cos(d*x+c)+1))^(3/2)*arctan(1/2*2^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*2^(1/2)+2^(1/2)*arctan(1/2*2
^(1/2)*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(1/2))*(-2*cos(d*x+c)/(cos(d*x+c)+1))^(3/2)*sin(d*x+c)-8*I*cos(d*x+c)^4+
4*I*cos(d*x+c)^3+8*cos(d*x+c)^3*sin(d*x+c)+4*I*cos(d*x+c)^2-4*cos(d*x+c)^2*sin(d*x+c))*(a*(I*sin(d*x+c)+cos(d*
x+c))/cos(d*x+c))^(1/2)/(I*sin(d*x+c)+cos(d*x+c)-1)/cos(d*x+c)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.36565, size = 671, normalized size = 7.22 \begin{align*} \frac{\sqrt{2}{\left (-i \, a e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} + \sqrt{\frac{1}{2}} \sqrt{-\frac{a^{3}}{d^{2}}} d \log \left (\frac{{\left (2 i \, \sqrt{\frac{1}{2}} \sqrt{-\frac{a^{3}}{d^{2}}} d e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left (a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) - \sqrt{\frac{1}{2}} \sqrt{-\frac{a^{3}}{d^{2}}} d \log \left (\frac{{\left (-2 i \, \sqrt{\frac{1}{2}} \sqrt{-\frac{a^{3}}{d^{2}}} d e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left (a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="fricas")

[Out]

1/4*(sqrt(2)*(-I*a*e^(2*I*d*x + 2*I*c) - I*a)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c) + sqrt(1/2)*sq
rt(-a^3/d^2)*d*log((2*I*sqrt(1/2)*sqrt(-a^3/d^2)*d*e^(2*I*d*x + 2*I*c) + sqrt(2)*(a*e^(2*I*d*x + 2*I*c) + a)*s
qrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c))*e^(-2*I*d*x - 2*I*c)/a) - sqrt(1/2)*sqrt(-a^3/d^2)*d*log((-2
*I*sqrt(1/2)*sqrt(-a^3/d^2)*d*e^(2*I*d*x + 2*I*c) + sqrt(2)*(a*e^(2*I*d*x + 2*I*c) + a)*sqrt(a/(e^(2*I*d*x + 2
*I*c) + 1))*e^(I*d*x + I*c))*e^(-2*I*d*x - 2*I*c)/a))/d

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*(a+I*a*tan(d*x+c))**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*(a+I*a*tan(d*x+c))^(3/2),x, algorithm="giac")

[Out]

Timed out